package com.syh.jn.scm.infrastructure.repository.model.base.financial;

import com.syh.core.ddd.infrastructure.repository.model.SuperBusinessModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 金融机构关联供应商
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "T_BASE_FINANCIAL_SUPPLIER_FINANCE")
@EqualsAndHashCode(callSuper = true)
public class SupplierFinanceModel extends SuperBusinessModel {
  /**
   * 供应商id
   */
  @Column(name = "SUPPLIER_ID", columnDefinition = "bigint COMMENT '供应商id'")
  private Long supplierId;
  /**
   * 贷款方式(0:应收保理,1:采购垫资 |0|1|,可单选,多选)
   */
  @Column(name = "LOAN_MODE", columnDefinition = "varchar(50) COMMENT '贷款方式'")
  private String loanMode;
  /**
   * 总贷款额度
   */
  @Column(name = "TOTAL_MODE_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '总贷款额度'")
  private BigDecimal totalModeAmount;
  /**
   * 合作状态(1：合作中  -1：暂停合作)
   */
  @Column(name = "COOPERATING_STATE", columnDefinition = "smallint COMMENT '合作状态(1：合作中  -1：暂停合作)'")
  private Short cooperatingState;
  /**
   * 合同附件图片url,保存格式json字符串{"contractUrl":"www.test.com","contractUrl":"www.demo.com"}
   */
  @Column(name = "CONTRACT_URL", columnDefinition = "varchar(1000) COMMENT '合同附件图片url'")
  private String contractUrl;

}
